//
// Created by 11510 on 2024/6/17.
//

#ifndef DEMO1_CIRCLE_H
#define DEMO1_CIRCLE_H


#include <iostream>
#include <cmath> // for M_PI

class Circle {
private:
    double radius;

public:
    Circle() : radius(0) {}

    Circle(double r) : radius(r) {}

    double getArea() const {
        return M_PI * radius * radius;
    }

    double getPerimeter() const {
        return 2 * M_PI * radius;
    }

    void show() const {
        printf("Radius = %lf, Perimeter = %lf, Area = %lf\n", radius, getPerimeter(), getArea());
    }
};


#endif //DEMO1_CIRCLE_H
